<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%String path = request.getContextPath() ;%>
<!--只在模块名下面有效 -->
<%@ taglib uri="/WEB-INF/tld/c.tld" prefix="c"%>
<%@ taglib uri="/WEB-INF/tld/ui.tld" prefix="ui"%>
<%@ taglib uri="/WEB-INF/tld/sys.tld" prefix="sys"%>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>集团贷款及担保</title>
<jsp:include page="../../import.jsp" flush="true" />
</head>
<body class="iframeBody">
	<div class="Wrapper">
		<div>
			<div class="searchArea">
				<form id="searchBar">
					<div class="fieldset1 clearFix">
						<div class="fieldBox">
							<div class="label" style="width: 60px;">集团ID</div>
							<div class="field">
								<input name="groupId" id="groupId" type="text" class="ui-textbox" value="">
							</div>
						</div>
						<div class="fieldBox">
							<div class="label" style="width: 80px;">集团名称</div>
							<div class="field">
								<input name="splNm" id="splNm" type="text" class="ui-textbox" value="">
							</div>
						</div>

						<div class="fieldBox">
							<div class="label" style="width: 60px;">关键人</div>
							<div class="field">
								<input name="relInfo" id="relInfo" type="text" class="ui-textbox" value="">
							</div>
						</div>

						<div class="clearFix"></div>
						<div class="btnsBox">
							<span id="searchBtn" class="sq-button sq-button-round">查询</span>
							<input id="resetBtn" type="reset" value="重置" class="l-button l-button-reset Hide"/>
						<%--<span onclick="toCancelGroupMemberRelation();" class="sq-button sq-button-round">解除关联</span>--%>
						</div>
					</div>
				</form>
			</div>
			<div id="ligergridDB" class="sq-grid"></div>
		</div>
	</div>

	<script type="text/javascript">
	var gridDB = null;
	var form = null ;
	$(function () {
		//initGridDB();//初始化待办列表
        gridDB = $("#ligergridDB").ligerGrid({
            url: '<%=path%>/splGroup/initList.do?splTypCd=1',
            method : 'get',
            columns: [
                { display: '集团ID', name: 'id', minWidth: 10 , enabledSort:false},
                { display: '集团名称', name: 'splName', minWidth: 50 , enabledSort:false},
                { display: '关键人', name: 'relInfo', minWidth: 300 , enabledSort:false},
                { display: '操作', name: '', minWidth: 140 , enabledSort:false,
                    render:function (rowdata, rowindex, value){
                        var h="";
                        h+='<a class="sq-button-hasicon" href="javascript:searchGrpMemberDataByPage(';
                        h+="'"+rowdata.id+"'";
                        h+=")\"><i class='sqBtnIco_5'></i>贷款及担保</a>";
                        return h;
                    }},
            ],
            pageSize:10,
            pageSizeOptions: [10, 20, 30, 40, 50, 100],//按照自己的喜好选择不同的页面显示条数
            root:'rows',
            record:'total',
            hideLoadButton : true,
            width: '100%',
            height:'100%',
            heightDiff:-30,
            checkbox:true,
            rownumbers:true
        });

        gridDB.setHeight(100);
        gridDB.options.isSingleCheck=true;

		form = $("#searchBar").ligerForm();

		$("#searchBtn").click(function(event) {
            var data = form.getData();
            console.log(JSON.stringify(data));
            for (name in data){
                gridDB.setParm(name,data[name]);
            };
            gridDB.reload();
        });
	});

	//业务统计
	function searchGrpMemberDataByPage(id){
		Add_navTab('tab_grp_member_data'+id,'贷款及担保','<%=path%>/grpcfg/splgrpprjbizview/toLoanList.do?cstRlCd=1'+"&groupId="+id);
	}
    $("#clearBtn").click(function(event) {
        $("#resetBtn").click();  //重置 input-text
        var form = liger.get("searchBar");
        form.setData({  //重置select等特殊表单
            "groupId":"",
            "splNm":"",
            "relInfo":""
        });
    });
</script>

</body>
</html>
